home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3g / isencrypt.z / isencrypt
Encoding:
Text File  |  2002-10-03  |  3.3 KB  |  67 lines

  1.  
  2.  
  3.  
  4. iiiisssseeeennnnccccrrrryyyypppptttt((((3333GGGG))))                                                    iiiisssseeeennnnccccrrrryyyypppptttt((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt - determine whether a character buffer is encrypted
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _cccc_cccc [_f_l_a_g ...] _f_i_l_e ...  _----_llll_gggg_eeee_nnnn [_l_i_b_r_a_r_y ...]
  13.  
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_gggg_eeee_nnnn_...._hhhh_>>>>
  15.  
  16.      _iiii_nnnn_tttt _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_f_b_u_f_,,,, _ssss_iiii_zzzz_eeee______tttt _n_i_n_b_u_f_))))_;;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt uses heuristics to determine whether a buffer of characters is
  20.      encrypted.  It requires two arguments: a pointer to an array of
  21.      characters and the number of characters in the buffer.
  22.  
  23.      _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt assumes that the file is not encrypted if all the characters in
  24.      the first block are ASCII characters.  If there are non-ASCII characters
  25.      in the first _n_i_n_b_u_f characters, _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt assumes that the buffer is
  26.      encrypted if the _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE category is set to _CCCC or _aaaa_ssss_cccc_iiii_iiii.
  27.  
  28.      If the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE category is set to a value other than _CCCC or _aaaa_ssss_cccc_iiii_iiii, then
  29.      _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt uses a combination of heuristics to determine if the buffer is
  30.      encrypted.  If _n_i_n_b_u_f has at least 64 characters, a chi-square test is
  31.      used to determine if the bytes in the buffer have a uniform distribution;
  32.      and _iiii_ssss_eeee_nnnn_cccc_rrrr_yyyy_pppp_tttt assumes the buffer is encrypted if it does.  If the buffer
  33.      has less than 64 characters, a check is made for null characters and a
  34.      terminating new-line to determine whether the buffer is encrypted.
  35.  
  36. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  37.      If the buffer is encrypted, 1 is returned; otherwise zero is returned.
  38.  
  39. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  40.      _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.